<%@tag description="Error Display Tag" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@attribute name="message" required="true" type="java.util.Map"%>

<c:if test="${message['read'] == true}">
	<c:set var="state" value="read" />
</c:if>
<c:if test="${message['read'] == false}">
	<c:set var="state" value="unread" />
</c:if>

<div class="${state}" id="${state}${message['id']}">
	<span>From: ${message['sender'] }</span>
	<br />
	<span>Object: ${message['object'] } Date: ${message['date'] }</span>
</div>

